<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>题目列表</title>
	
</head>
<body>

	<?php require_once("oj-header.php");?>

<div>

<div>
              <form class="form-inline" role="form" action="problemset.php" method="GET">

                  <label class="sr-only" for="text">搜索题目</label>
                  <input placeholder="按回车搜索" name="search" id="text" class="form-control"/>

              </form>
</div>
<table id='problemset' class='table table-striped table-condensed'>
                <thead>
                          <tr>
                          	<th width='10%'><?php echo $MSG_PROBLEM_ID?></th>
                            <th><?php echo $MSG_TITLE?></th>
                            <th width='20%'>标签</th>
                            <th width='5%'><?php echo $MSG_AC?></th>
                            <th width='5%'><?php echo $MSG_SUBMIT?></th>
                          </tr>
                </thead>

		  
			<tbody>
			<?php 
			foreach($view_problemset as $row){
				echo "<tr>";
				foreach($row as $table_cell){
					//echo "<td>";
					echo "\t".$table_cell;
					//echo "</td>";
				}				
				echo "</tr>";
			}
			?>
			</tbody>
</table>
<center>
<ul class="pagination">
     <?php
	if($page!=1)echo "<li><a href='problemset.php?page=".($page-1)."'>&laquo;</a></li>";
	else echo "<li><a>&laquo;</a></li>";
    for ($i=1;$i<=$view_total_page;$i++){
		if ($i>1) echo '&nbsp;';
		if ($i==$page)echo "<li  class='active'><a>".$i."</a></li>";
		else echo "<li><a href='problemset.php?page=".$i."'>".$i."</a></li>";
	}
	if($page+1<$view_total_page)echo "<li><a href='problemset.php?page=".($page+1)."'>&raquo;</a></li>";
	else echo "<li><a>&raquo;</a></li>";
    ?>
</ul>
</center>
<div id=foot>
	<?php require_once("oj-footer.php");?>

</div><!--end foot-->
</div><!--end main-->

</body>
</html>
